package pl.edu.mimuw.irs.core.model.design.processing;

import pl.edu.mimuw.irs.core.global.UniqueObject;


/**
 * @author Jakub Rauch
 * Created on: 2009-05-07
 */
public class Role extends UniqueObject {

	// *** Attributes
	
	private String name;
	// Getters and setters
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	// *** Constructors
	public Role(String name) {
		setName(name);
	}
	
	// *** Methods
	
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Role &&
				((Role)obj).getName().equals(getName())) {
			return true;
		} else {
			return false;
		}
	}
	
	@Override
	public int hashCode() {
		return getName().hashCode();
	}
}
